gtk-demo: Start to fix up the spacing
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Oct 2016 19:03:04 +0000 (15:03 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 26 Oct 2016 19:03:04 +0000 (15:03 -0400)
Replace some cases of lost border-width with margins.

demos/gtk-demo/button_box.c
demos/gtk-demo/changedisplay.c
demos/gtk-demo/clipboard.c

index d5182b08a1e740c5e4a6e0c628be641bd82a75ba..180d63997d1fc1292863acef65aa20dd1c8ee175 100644 (file)
@@ -23,6 +23,8 @@ create_bbox (gint  horizontal,
   else
     bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
 
+  g_object_set (bbox, "margin", 5, NULL);
+
   gtk_container_add (GTK_CONTAINER (frame), bbox);
 
   gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
@@ -62,6 +64,7 @@ do_button_box (GtkWidget *do_widget)
                       &window);
 
     main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+    g_object_set (main_vbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (window), main_vbox);
 
     frame_horz = gtk_frame_new ("Horizontal Button Boxes");
@@ -70,6 +73,7 @@ do_button_box (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE);
 
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
+    g_object_set (vbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
 
     gtk_box_pack_start (GTK_BOX (vbox),
@@ -100,6 +104,7 @@ do_button_box (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE);
 
     hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
+    g_object_set (hbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
 
     gtk_box_pack_start (GTK_BOX (hbox),
index 6a066e2fc2edb6d953b9b211d100d3afd829aaae..f8137c895e91b279c7c6896ca47d6e17d57eed68 100644 (file)
@@ -305,6 +305,7 @@ create_frame (ChangeDisplayInfo *info,
   *frame = gtk_frame_new (title);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
+  g_object_set (hbox, "margin", 8, NULL);
   gtk_container_add (GTK_CONTAINER (*frame), hbox);
 
   scrollwin = gtk_scrolled_window_new (NULL, NULL);
@@ -538,6 +539,7 @@ do_changedisplay (GtkWidget *do_widget)
       content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
 
       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
+      g_object_set (vbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE);
 
       frame = create_display_frame (info);
index e3ca3ea942bb0ec55d678a9168875df116574535..4a038d6cfb63014f62bc69f0c460aaec63bdf6c0 100644 (file)
@@ -219,6 +219,7 @@ do_clipboard (GtkWidget *do_widget)
                         G_CALLBACK (gtk_widget_destroyed), &window);
 
       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+      g_object_set (vbox, "margin", 8, NULL);
 
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
@@ -227,6 +228,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the first entry */
@@ -243,6 +245,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the second entry */
@@ -259,6 +262,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the first image */